home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / vmake / readme.vmake2-7 < prev    next >
Encoding:
Text File  |  1994-02-12  |  6.7 KB  |  152 lines

  1. There have been several changes to VMake since the last release of the 
  2. documents.  These notes are accurate for Version 2.7.
  3.  
  4. VMake now supports a rexx port fairly fully.  The port name is stored in
  5. symbol _PORT_ which you can query by using the log command  For example,
  6. if you define a new menu item in DCC:VMake.config as
  7.  
  8.   ITEM  "Show port"  "" "LOG %(_PORT_)"
  9.  
  10. you can display the REXX port at any time by choosing that menu entry.
  11. The value of the port will normally be VMAKE.01 unless you have multiple
  12. copies of VMake running.
  13.  
  14. You can invoke the commands described in chapter 5 section 4, namely
  15. QUIT, TRACE, EDIT, EXEC, ADDR, READ, NEW, SAVE, FRONT, BACK, JUMP, LOG, 
  16. SCAN, SET, CONFIG, CALL, and SELECT.  If the commands take a parameter,
  17. you MUST provide the parameter when invoking the command from REXX.
  18. VMAKE  never uses requesters when commands are invoked from REXX, it just
  19. returns a fail result code.  The text for the error code is one of the 
  20. TEXT entries in file DCC:config/VMake.config.
  21.  
  22. You can get the value of any VMake symbol using the LOG command.  When
  23. invoked from REXX, the value is put in the REXX return result string
  24. as well as being printed to the console window.  You can use all the
  25. substitution symbols.  LOG %(SYMBOL) will return the value of SYMBOL.
  26.  
  27. You can use the following REXX script to find your way around.  The
  28. "options results" line causes REXX to use RC for error codes from
  29. commands.  RC = 0 if there are no errors.  If RC = 0, RESULT will be set
  30. by VMAKE.  The value will be the string "Command OK" unless the command
  31. was LOG, in which case it will be whatever string LOG creates.
  32.  
  33.    /* send a rexx command to vmake */
  34.    options results
  35.    arg cmd cmdargs
  36.    say 'command =' cmd
  37.    say 'args =' cmdargs
  38.    address VMAKE.01
  39.    cmd cmdargs
  40.    say 'Return result =' RC ':' RESULT
  41.  
  42. To invoke a REX script from within VMake, use the ADDR command, not EXEC.
  43. For example, you could define a menu item to invoke TEST.REXX:
  44.  
  45.    ITEM "Test" "" "ADDR REXX TEST.REXX %(_PORT_) %s"
  46.  
  47. This will invoke TEST.REXX and pass the name of VMake's REXX port and the
  48. full path name of the currently selected list entry.  TEST.REXX can use
  49. any of the VMake commands, and whatever else you choose to throw in.
  50.  
  51. If you used EXEC instead of ADDR, and TEST.REXX attempted to invoke a
  52. VMake command, your VMake and REXX sessions would hang as each waited
  53. for the other to relinquish control.
  54.   
  55. SCAN now understands subdirectories.  The following menu item does more
  56. or less what you might expect:
  57.  
  58.    ITEM "Scan hdrs" "" "SCAN hdrs/#?.h"
  59.  
  60. The SELECT command is now implemented.  The parameter can either be the
  61. full path name as it appears in the list, or just the file name.  The
  62. REXX return code is 0 if it succeeds, and the item will be visually
  63. selected in the list as if you had clicked once with the mouse.
  64.  
  65. The following new commnds have been implemented for use with menus,
  66. buttons or REXX scripts:  ADD, DEL, LTOP, LBOT, LUP, LDN & RECFG
  67.  
  68. RECFG takes one parameter, a config file name.  If you don't provide a
  69. name, you will get a file requester (unless you invoke RECFG from REXX,
  70. in which case you get an error).  The new config file can be as
  71. different from the old one as you like, except that you should use the
  72. same names for symbols.  Not only can you change the menus and buttons,
  73. you can define different gadgets if you wish.
  74.  
  75. If you invoke RECFG from within a project, it will assign the new config
  76. file name to a symbol CONFIG.  If you save the project, this symbol will
  77. be saved with it and the specified config file will be used every time
  78. you open that project.  If you quit the project without saving, you will
  79. see a requester asking if you want to save the updated project file or
  80. not. 
  81.  
  82. All the other commands refer to the subgadgets of the LIST gadget.  
  83.  
  84. ADD takes a parameter (or it will give you the same file requester as
  85. the NEW gadget as long as you are not in REXX), and it adds the parameter
  86. to the list.  The newly added item becomes the selected list entry.
  87.  
  88. DEL deletes the current selection from the list.  It takes no parameter
  89. and will fail if nothing is selected.  If it succeeds, it leaves the
  90. next entry in the list selected.
  91.  
  92. LTOP, LBOT, LUP and LDN position you to the top or bottom of the list or
  93. move you up or down.  They will all leave the selected entry selected
  94. and visually highlighted, or fail if there is no entry to move to.
  95.  
  96. Vmake now provides better support for symbols you may define that are
  97. not associated with any visible gadget.  If you use the SET command to
  98. define a new symbol, it will be saved to the project (.DICE) file.  If
  99. you attempt to quit without saving, you will now get a requester warning 
  100. you that the project has changed.  Such symbols can be useful with REXX
  101. commands or with menus, using the %(SYMBOL) substitution construct.
  102.  
  103. The CREATE option in the PROJECT menu has not been implemented.  You can
  104. only create new projects in existing directories, using the NEW option.
  105. If you want to create a totally new project, you should first create a
  106. directory for it before starting VMAKE.
  107.  
  108. A new item has been added to the PROJECT menu, as described above.
  109.  
  110. CONFIGURE will request a configuration file name, and then open the
  111. selected config file, allowing you to redefine buttons, menus, or any of
  112. the gadgets, text strings or config strings.
  113.  
  114. A new menu, LIST, has been created to illustrate the use of the list
  115. movement commands.  It also creates keyboard equivalents to let you move
  116. around the list.
  117.  
  118. Two new standard symbols have been defined.
  119.  
  120. _CONFIG_ is project independant, and always contains the name of the
  121. most recently loaded config file.
  122.  
  123. CONFIG is project dependent.  It need not be defined, but if it is set
  124. in a project (.DICE) file , it will cause the named config file to be 
  125. loaded immediately after the project is loaded.  If it is not defined, 
  126. and a non standard config file was in use, the standard config file will 
  127. be restored immediately after the project is loaded.
  128.  
  129. Some new TEXT and CONFIG strings have been defined in the config file.
  130.  
  131. TEXT SLOT 20 "Symbols too large for command buffer"
  132.  
  133. message indicating a command could not execute because when the
  134. sustitutions were performed, the results overflowed the command buffer. 
  135.  
  136. TEXT SLOT 21 "Unable to select requested item: "
  137.  
  138. message indicating that a parameter in a command such as SELECT could
  139. not be found in the list.
  140.  
  141. TEXT SLOT 22 "Invalid or missing parameters for command"
  142.  
  143. Particularly likely to occur when a command is invoked improperly from
  144. REXX.  Otherwise VMake would put up a requester.
  145.  
  146. CONFIG SLOT 4  "(#?.config)"
  147.  
  148. this is the search pattern for the DOS 2.0 file requester used by the
  149. RECFG command to get a config file name.
  150.  
  151. Previously documented CONFIG SLOTS 4 through 11 have been moved to
  152. positions 5 through 12 respectively.